<extend name="Public/base"/>

<block name="style">
<link href="__CSS__/jtbk.css" rel="stylesheet" type="text/css"/>
</block>
<block name="content">   
    <ul class="nav nav-tabs">
   <li ><a href="{:U('Shiti/index')}"><i class="glyphicon glyphicon-home"></i>首页</a></li>
   <li ><a href="{:U('Shiti/add')}">试卷上传</a></li>
   <li class="active"><a href="{:U('Shiti/search')}">试卷搜索</a></li>
  <!--  <li><a href="{:U('Index/addsubject')}">课程管理</a></li> -->
   <li ><a href="{:U('Shiti/myupload','id='.$vo['id'])}" >我的试卷</a><li>
   </ul>
	<!-- 标题栏 -->
       <h4 style="color:#5A81A8"><span class="glyphicon glyphicon-search"></span>试卷检索 </h4> 
       <!--搜索表单start-->
        <div class="form-inline">
        <form method='post' id="form" name="form"  action="{:U('Shiti/search')}" >
        <div class="controls">           
           <label class="sr-only" for="grade">年级</label>
            <select name="grade" id="grade" class="form-control">
                <option>{$Think.post.grade|default="所有年级"}</option>
                <option >一年级上</option>
                <option >一年级下</option>
                <option >二年级上</option>
                <option >二年级下</option>
                <option >三年级上</option>
                <option >三年级下</option>
                <option >四年级上</option>
                <option >四年级下</option>
                <option >五年级上</option> 
                <option >五年级下</option>
                <option >六年级上</option> 
                <option >六年级下</option> 
                <option >所有年级</option>                      
            </select>
         
           <label class="sr-only" for="subject">科目</label>
            <select class="form-control" name="subject" id="subject" class="span1" >
            <option>{$Think.post.subject|default="所有学科"}</option>
            <option >所有学科</option>
               <foreach name="subjectlist" item="vo">
                <option >{$vo.subject}</option>
               </foreach>                   
            </select>

      
           <label style="margin-left:20px" class="control-label has-success" for="key">关键词:</label>

                 <input style="width:300px" class="form-control" type="text" name="keywords"  placeholder="请输入关键词"  value="{$Think.post.keywords}"/>



          <button type="submit" class="btn btn-success">查询</button>

        </div>
      </form> 
      </div> 
      <hr/>  
      <!--搜索表单end-->
        <empty name="list">
            <br/>
                <span>未找到您需要的资料，请通知相关老师上传！</span>
         <else/>
           <table class="table table-striped" width="95%">
            <thead>
            <tr class="info">
                <th>序号</th><th>学科</th><th>年级</th><th>标题</th><th>出卷教师</th><th>上传日期</th><th>最近更新</th><th>操作</th>
            </tr>
            </thead>
            <volist name="list" id="v" >
            <tr>
                <td>{$i}</td>
                <td><a href="{:U('Shiti/search',array('subject_id'=> $v['subject_id']))}">{$v.subject}</a></td>
                <td><a href="#">{$v.grade}</a></td>  
                <td><a href="{:U('Shiti/detail','id='.$v['id'])}">{$v.title}</a></td> 
                <td>{$v.teacher}</td> 
                <td>{$v.create_time|date='Y-m-d',###}</td>                    
                <td>{$v.update_time|date='Y-m-d',###}</td>
                <td>
                <a href="{:U('Jtbk/Shiti/detail','id='.$v['id'])}"><span style="color:#0088AA"><i class="glyphicon glyphicon-edit"></i>查看</span></a>｜
                <a href= "{:U('Jtbk/Shiti/download','fid='.$v['id'])}" ><span style="color:#0088AA"><i class="glyphicon glyphicon-save"></i>下载</span></a></td>

                </tr>
            </volist>
            </table>
        </empty> 
 </div> 
</block>

